package com.hotel.tv.entities.emp;

import com.autumn.domain.entities.AbstractDefaultEntity;
import com.autumn.mybatis.mapper.annotation.Index;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Table;

/**
 * 员工信息
 * <p>
 * </p>
 *
 * @description TODO
 * @author: 老码农
 * @create: 2020-04-08 15:09
 **/
@Getter
@Setter
@Table(name = "base_emp")
public class EmpInfo extends AbstractDefaultEntity {

    @GeneratedValue(strategy = GenerationType.TABLE)
    @Override
    public Long getId() {
        return super.getId();
    }

    /**
     * 员工编号
     */
    @Column(nullable = false, length = 100)
    private String empCode;

    /**
     * 员工名称
     */
    @Column(nullable = false, length = 100)
    private String empName;

    /**
     * 职务id
     */
    @Column(nullable = false)
    @Index
    private Long postId;

    /**
     * 岗位id
     */
    @Column(nullable = false)
    @Index
    private Long roleId;

}
